html,
body,
main {
  width: 100%;
  height: 100%;
}

body {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Lato", "Helvetica Neue", Arial, Helvetica, sans-serif;
  font-size: 14px;
  overflow: hidden;
  overscroll-behavior: none;
}

a {
  color: rgb(40, 90, 125);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: rgb(70, 100, 115);
}

label {
  display: block;
}

input,
button,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  -webkit-padding: 0.4em 0;
  padding: 0.4em;
  margin: 0 0 0.5em 0;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 2px;
}

input:disabled {
  color: #ccc;
}

button {
  color: #333;
  background-color: #f4f4f4;
  outline: none;
  cursor: pointer;
}

button:disabled {
  color: #999;
}

button:not(:disabled):active {
  background-color: #ddd;
}

button:focus {
  border-color: #666;
}

select {
  cursor: pointer;
}

font {
  pointer-events: none;
}

.tooltip {
  position: absolute;
  padding: 0.5em;
  z-index: 99;
  color: #fff;
  background-color: #1e1e1e;
  border: 1px solid #333;
  opacity: 0.9;
  max-width: 330px;

  visibility: hidden;
  opacity: 0;
  animation: 1s fadeIn;
  animation-fill-mode: forwards;
}

@keyframes fadeIn {
  0% {
    visibility: hidden;
    opacity: 0;
  }
  80% {
    visibility: visible;
    opacity: 0;
  }
  100% {
    visibility: visible;
    opacity: 1;
  }
}

.flutter {
  animation: shake 10s ease infinite;
  animation-iteration-count: 5;
}

@keyframes shake {
  2%,
  18% {
    transform: translate3d(-0.5px, 0, 0);
  }
  4%,
  16% {
    transform: translate3d(0.5px, 0, 0);
  }
  6%,
  10%,
  14% {
    transform: translate3d(-1px, 0, 0);
  }
  8%,
  12% {
    transform: translate3d(1px, 0, 0);
  }
  20%,
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* Navbar */
/* low-width (narrow) screen */
@media (max-width: 540px) {
  nav div.container > div.dropdown.level3 {
    margin-left: -10em;
    background-color: #222;
  }
}

/* low-height screen */
@media (min-width: 540px) and (max-height: 640px) {
  nav div.level3 {
    grid-template-columns: 1fr 1fr;
  }
}

/* low-height screen */
@media (min-width: 640px) and (max-height: 540px) {
  nav div.level3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* low-height screen */
@media (max-height: 440px) {
  nav div.container > li,
  nav div.dropdown > li {
    padding-block: 0.5em;
  }
}

/* Navbar dropdown menu */
.dropdown {
  display: none;
  position: fixed;
  background-color: #1b1c1d;
  min-width: 10em;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.level2 {
  margin-left: 10em;
}

.level3 {
  z-index: 2;
  margin-left: 10em;
}

.container:hover > .dropdown {
  display: grid;
}

.container:hover > .dropdown.horizontal {
  display: flex;
}
